package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class AddTableConstraintDefinition implements AlterTableAction {

    private final int beginIndex;
    private final int endIndex;
    private TableConstraintDefinition tableConstraintDefinition;

    public AddTableConstraintDefinition(int beginIndex, TableConstraintDefinition tableConstraintDefinition) {
        this.beginIndex = beginIndex;
        this.endIndex = tableConstraintDefinition.getEndIndex();
        this.tableConstraintDefinition = tableConstraintDefinition;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public TableConstraintDefinition getTableConstraintDefinition() {
        return tableConstraintDefinition;
    }

}
